package com.zryc.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 购物车表
 * </p>
 *
 * @author xujiajun
 * @since 2022-10-17
 */
@TableName("order_cart")
@ApiModel(value = "OrderCart对象", description = "购物车表")
public class OrderCart implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("购物车ID")
    @TableId(value = "cart_id", type = IdType.AUTO)
    private Integer cartId;

    @ApiModelProperty("用户ID")
    private Integer customerId;

    @ApiModelProperty("商品ID")
    private Integer productId;

    @ApiModelProperty("加入购物车商品数量")
    private Integer productAmount;

    @ApiModelProperty("商品价格")
    private BigDecimal price;

    @ApiModelProperty("加入购物车时间")
    private LocalDateTime addTime;

    public Integer getCartId() {
        return cartId;
    }

    public void setCartId(Integer cartId) {
        this.cartId = cartId;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public Integer getProductAmount() {
        return productAmount;
    }

    public void setProductAmount(Integer productAmount) {
        this.productAmount = productAmount;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public LocalDateTime getAddTime() {
        return addTime;
    }

    public void setAddTime(LocalDateTime addTime) {
        this.addTime = addTime;
    }

    @Override
    public String toString() {
        return "OrderCart{" +
            "cartId = " + cartId +
            ", customerId = " + customerId +
            ", productId = " + productId +
            ", productAmount = " + productAmount +
            ", price = " + price +
            ", addTime = " + addTime +
        "}";
    }
}
